<?php

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
 */

//测试接口
Route::any('send_socket', 'TestController@sendSocket');

//BAP手机端接口路由

Route::group(['middleware' => ['web', 'CheckToken']], function () {
    Route::group(['namespace' => 'Api'], function () {
        //oss
        Route::any('get_oss_info', 'AliossController@get_oss_info');
        //error
        Route::any('error', 'LoginController@error');
        //errlo_log
        Route::any('error_log', 'ErrorController@error_log');
        //登录
        Route::any('login', 'LoginController@login');
        //登录
        Route::any('log_in', 'LoginController@log_in');
        //注册
        Route::any('sign_in', 'LoginController@sign_in');
        //忘记密码
        Route::any('forget_password', 'LoginController@forget_password');
        //设置--修改登录密码
        Route::any('update_password', 'LoginController@update_password');
        //设置--修改交易密码
        Route::any('update_pay_pass', 'LoginController@update_pay_pass');
        //设置交易密码（第一次）
        Route::any('set_pay_pass', 'LoginController@set_pay_pass');
        //设置--修改交易密码通过邮箱验证码
        Route::any('update_pass_by_code', 'LoginController@update_pass_by_code');
        //提交实名认证信息
        Route::any('save_real_info', 'CenterController@save_real_info');
        //绑定支付宝
        Route::any('bind_alipay', 'CenterController@bind_alipay');
        //绑定微信
        Route::any('bind_wechat', 'CenterController@bind_wechat');
        //获取后台设置的usdt价格
        Route::any('rech_public_fit', 'CenterController@rech_public_fit');
        //系统消息列表
        Route::any('message_list', 'MessageController@message_list');
        //消息详情
        Route::any('message_info', 'MessageController@message_info');
        //首页
        Route::any('index', 'IndexController@index');
        //所有币种信息
        Route::any('currency_types', 'EntrustController@currency_types');
        //交易(买入卖出)
        //Route::any('order_list', 'EntrustController@order_list');
        //委托单列表
        Route::any('entrust_list', 'EntrustController@entrust_list');
        //发送邮箱验证码
        Route::any('send_email_code', 'SmsController@send_email_code');
        //发送手机验证码
        Route::any('send_phone_code', 'SmsController@send_phone_code');
        //检查验证码是否正确
        Route::any('validator_code', 'SmsController@validator_code');
        //左仁慈
        Route::any('zrc', 'ZrcController@zrc');

        //买卖显示
        Route::any('currency_market', 'CurrencyController@currency_market');
        //持有货币行情
        Route::any('user_currency_market', 'CurrencyController@user_currency_market');
        //可买数量
        Route::any('trading_num', 'CurrencyController@trading_num');
        //货币列表
        Route::any('currency_list', 'CurrencyController@currency_list');
        Route::any('currency_turn_list', 'CurrencyController@currency_turn_list'); //货币支持转入转出的列表
        Route::any('add_currency_list', 'PropertyController@add_currency_list'); //需要添加的货币列表

        //委托买卖
        Route::any('entrust_create', 'CurrencyController@entrust_create');
        //买卖行情
        Route::any('clearing_bank', 'OrderController@clearing_bank');
        //转入转出记录
        Route::any('turn_list', 'TurnController@turn_list');
        //订单记录
        Route::any('order_index', 'OrderController@order_index');
        //账单
        Route::any('property_info_list', 'PropertyInfoController@property_info_list');
        //资产列表
        Route::any('property_list', 'PropertyController@property_list');
        Route::any('property_info', 'PropertyController@property_info');
        Route::any('property_my', 'PropertyController@property_my');
        Route::any('property_add', 'PropertyController@property_add'); //资产添加
        //转入转出
        Route::any('currency_swap', 'TurnController@currency_swap');
        Route::any('turn_out_submit', 'TurnController@turn_out_submit'); //转出提交
        Route::any('turn_into', 'TurnController@turn_into'); //转入页面显示
        Route::any('turn_out', 'TurnController@turn_out'); //转出页面显示
        //关于APP
        Route::any('about_app', 'ConfigController@about_app');
        //关于我们
        Route::any('about_us', 'ConfigController@about_us');
        //关于服务条款
        Route::any('about_clause', 'ConfigController@about_clause');
        //实名认证上传
        Route::any('autonym_index', 'AutonymController@autonym_index');
        //实名认证状态
        Route::any('autonym_status', 'AutonymController@autonym_status');
        //实名提交状态
        Route::any('autonym_submit', 'AutonymController@autonym_submit');
        //测试方法
        Route::any('test', 'CurrencyController@test');
        //添加云信
        Route::any('yx_add', 'PlanController@yx_add');
        //首页二级行情
        Route::any('index_market', 'IndexController@index_market');
        //系统未读消息
        Route::any('message_unread', 'MessageController@message_unread');
        //K线图横屏
        Route::any('index_kline', 'IndexController@index_kline');
        //K线图头部
        Route::any('index_kline_head', 'IndexController@index_kline_head');
        //深度图
        Route::any('depth_line', 'IndexController@depth_line');
        //K线图竖屏
        Route::any('index_kline_h', 'IndexController@index_kline_h');
        //K线图数据
        Route::any('index_kline_data', 'IndexController@index_kline_data');
        //深度图数据
        Route::any('depth_line_data', 'IndexController@depth_line_data');
        //K线图数据
        Route::any('send_kilne_socket', 'IndexController@send_kilne_socket');
        //协议
        Route::any('get_article', 'ArticleController@get_article');
        //获取OBA的昨日收盘价
        Route::any('get_close_price', 'IndexController@get_currency_close_price');
        //文件上传
        Route::any('upload_file_to_oss', 'AliossController@upload_file_to_oss');
        //取消委托
        Route::any('entrust_undo', 'EntrustController@entrust_undo');

        //可卖资产，对应全部卖出
        Route::any('sell_assets', 'PropertyController@sell_assets');
    });

    Route::group(['namespace' => 'Coin'], function () {
        //李振华
        //买入和卖出列表
        Route::any('entry_orders', 'EntryOrdersController@entry_orders');
        //c2c买入和卖出详情入库
        Route::any('new_pay_order', 'EntryOrdersController@new_pay_order');
        //c2c买入和卖出详情
        Route::any('pay_info', 'EntryOrdersController@pay_info');
        //c2c订单状态详情
        Route::any('order_info', 'EntryOrdersController@order_info');
        //支付宝订单号
        Route::any('add_alipay_indent', 'EntryOrdersController@add_alipay_indent');
        //条例信息
        Route::any('remind', 'EntryOrdersController@remind');
        //条例信息
        Route::any('now_time', 'EntryOrdersController@now_time');
        //c2c订单列表
        Route::any('rechorder_list', 'EntryOrdersController@rechorder_list');
        //c2c订单完成
        Route::any('success_order', 'EntryOrdersController@success_order');
        //c2c交易密码判断
        Route::any('check_pay_word', 'EntryOrdersController@check_pay_word');
        //通用 修改订单状态
        Route::any('update_order_status', 'OrderController@update_order_status');
        //申诉订单
        Route::any('appeal_order', 'OrderController@appeal_order');
        //被申述提交
        Route::any('appeal_reply', 'OrderController@appeal_reply');

        //左仁慈
        //Route::any('coin_index', 'IndexController@coin_index');
        Route::any('coin_test', 'YnxinController@test');
        Route::any('check_yx', 'YnxinController@check_yx');
        Route::any('register_yx', 'YnxinController@register_yx');
        Route::any('send_yx_msg', 'YnxinController@send_yx_msg');
        Route::any('lock_yx_msg', 'YnxinController@lock_yx_msg');
        Route::any('change_yx', 'YnxinController@change_yx');
        //绑定账户信息
        Route::any('bind_pay_info', 'UserController@bindPayInfo');
        //获取账户信息
        Route::any('get_pay_info', 'UserController@getPayInfo');
        //修改头像
        Route::any('update_headimg', 'CenterController@update_headimg');
        //修改昵称
        Route::any('update_nickname', 'CenterController@update_nickname');
        //获取USDT汇率（获取的是美元汇率）
        Route::any('get_usdt_rate', 'PublicController@get_usdt_rate');
        //获取最新版本号
        Route::any('get_last_version', 'PublicController@get_last_version');
    });
});
